module UsersHelper
  
	def is_admin(user_id)
		return User.is_admin(user_id)
	end

	def get_user_name(id)
		return User.find_by_id(id).name
	end

  def num_posts(id)
    return User.find_by_id(id).posts.size
  end

  def get_user_level(id)
    if !id.nil?
      user = User.find_by_id(id)
      return user.user_level_id
    else
      return UserLevel.find_by_name("Public").id
    end
  end

end
